package com.bdqn.service.impl;

import com.bdqn.mapper.StockMedicinesMapper;
import com.bdqn.pojo.StockMedicines;
import com.bdqn.service.StockMedicinesService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StockMedicinesServiceImpl implements StockMedicinesService {
    @Autowired
    StockMedicinesMapper stockMedicinesMapper;
    public PageInfo<StockMedicines> pageInfo(int pageNum, int pageSize, String medicinesName, String keywords, String medicinesType, String producterName, String prescriptionType, String status){
        PageHelper.startPage(pageNum,pageSize);
        List<StockMedicines> list=stockMedicinesMapper.select(medicinesName,keywords,medicinesType,producterName,prescriptionType,status);
        PageInfo<StockMedicines> pageInfo=new PageInfo<>(list);
        return pageInfo;
    }
}
